
    // oCPC初始化
    let qhclickid = ""  // 360id
    let bd_vid = ""     // 百度id

    let str = window.location.search
    let obj = str.substring(1).split("&").reduce((prev, item) => {
        let [key, value] = item.split("=");
        prev[key] = value;
        return prev;
    }, {});
    qhclickid = obj.qhclickid;
    bd_vid = obj.bd_vid;

    // baidu 本地初始化
    if (bd_vid) {
        // 写入缓存
        sessionStorage.setItem("bd_vid", bd_vid);
    }

    // 360 本地初始化
    if (qhclickid) {
        // 写入缓存
        sessionStorage.setItem("qhclickid", qhclickid);
    }


    function callbackOcpc() {
        // 360归因
        if (sessionStorage.getItem("qhclickid")) {
            // console.log("360归因")
            axios("https://api.szcits.cn/so360.ocpc/upload", {
                params: {
                    event: "ADVISORY_BUTTON", //类别
                    qhclickid: sessionStorage.getItem("qhclickid"), //点击id
                    data_industry: "ocpc_ps_convert",
                },
            });
            // 删除 qhclickid
            sessionStorage.removeItem("qhclickid")
        }

        // 百度归因
        if (sessionStorage.getItem("bd_vid")) {
            // console.log("百度归因")
            axios("https://api.szcits.cn/baidu.ocpc/upload", {
                params: {
                    url: window.location.origin,
                    bd_vid: sessionStorage.getItem("bd_vid"), //点击id
                },
            });
            // 删除 qhclickid
            sessionStorage.removeItem("bd_vid")
        }

        // 调整在在线客服
        window.open("https://h5.szcits.cn/chatlink.html", "_blank");
    }